import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:ytbusiness/config/yt_theme.dart';
import 'package:ytbusiness/page/auto_makers/shop_home/shop_home_page.dart';
import 'package:ytbusiness/page/repair_factory/repair_factory_home.dart';
import 'package:ytbusiness/state/user_role.dart';
import 'package:ytbusiness/utils/helper.dart';
import 'package:ytbusiness/utils/screen_adaptation.dart';
import 'package:ytbusiness/widgets/widgets.dart';


///完善信息完成
class AddToComplete extends StatefulWidget {
  @override
  _AddToCompleteState createState() => _AddToCompleteState();
}

class _AddToCompleteState extends State<AddToComplete> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: customAppBar(context,title: "店铺信息"),
      body: SingleChildScrollView(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            SizedBox(
              height: setWidth(65),
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [

                Provider.of<UserRole>(context,listen:false).role == 1? Container(
                  height: setWidth(75),
                  width: setWidth(75),
                  child: Image.asset("assets/images/repair_add_done.png"),
                ):
                Container(
                  height: setWidth(75),
                  width: setWidth(75),
                  child: Image.asset("assets/images/add_done.png"),
                ),
              ],
            ),
            SizedBox(
              height: setWidth(17),
            ),
            Text("审核中",style: TextStyle(
                color: Color(0xff323232),fontSize: setSp(18)
            ),),
            SizedBox(
              height: setWidth(19),
            ),
            Text("预计1-3个工作日内审核完毕",style: TextStyle(
                color: Color(0xff999999),fontSize: setSp(14)
            ),),
            SizedBox(
              height: setWidth(89),
            ),
            GestureDetector(
              behavior: HitTestBehavior.opaque,
              onTap: (){
                if(Provider.of<UserRole>(context,listen:false).role == 1){
                  jump(context,widget: RepairFactoryHome(),name: "repair_factory_home");
                }else{
                  jump(context,widget: ShopHomePage(),name: "store_home_page");
                }
              },
              child: Container(
                margin: EdgeInsets.only(left: setWidth(15),right: setWidth(15)),
                padding: EdgeInsets.only(top: setWidth(15),bottom: setWidth(15)),
                decoration: BoxDecoration(
                  color: YTTheme.theme,
                  borderRadius: BorderRadius.circular(22),

                ),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    Text("完成",style: TextStyle(
                        color: Colors.white,fontSize: setSp(15)
                    ),),
                  ],
                ),
              ),
            )

          ],
        ),
      ),
    );
  }
}
